package io.jt808.proto.req;


import io.norland.annotations.Proto;
import io.norland.buffer.AutoBuffer;
import io.norland.proto.IProto;
import lombok.Data;

/**
 * 终端鉴权
 */
@Proto("0102")
@Data
public class JT0102 implements IProto {
    private String authenticationCode;

    public final byte[] writeToBytes() {
        AutoBuffer buffer = new AutoBuffer();
        buffer.writeString(authenticationCode);
        return buffer.array();
    }

    public final void readFromBuf(AutoBuffer buffer) {
        authenticationCode = buffer.readString();
    }

}